3.7.74 \(\int (a+b \sin (e+f x)) \, dx\) [674]

Optimal. Leaf size=16 \[ a x-\frac {b \cos (e+f x)}{f} \]

[Out]

a*x-b*cos(f*x+e)/f

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2718} \begin {gather*} a x-\frac {b \cos (e+f x)}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[a + b*Sin[e + f*x],x]

[Out]

a*x - (b*Cos[e + f*x])/f

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int (a+b \sin (e+f x)) \, dx &=a x+b \int \sin (e+f x) \, dx\\ &=a x-\frac {b \cos (e+f x)}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 27, normalized size = 1.69 \begin {gather*} a x-\frac {b \cos (e) \cos (f x)}{f}+\frac {b \sin (e) \sin (f x)}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[a + b*Sin[e + f*x],x]

[Out]

a*x - (b*Cos[e]*Cos[f*x])/f + (b*Sin[e]*Sin[f*x])/f

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 17, normalized size = 1.06

method result size
default \(a x -\frac {b \cos \left (f x +e \right )}{f}\) \(17\)
risch \(a x -\frac {b \cos \left (f x +e \right )}{f}\) \(17\)
derivativedivides \(\frac {\left (f x +e \right ) a -b \cos \left (f x +e \right )}{f}\) \(22\)
norman \(\frac {a x +a x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {2 b \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}\) \(52\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+b*sin(f*x+e),x,method=_RETURNVERBOSE)

[Out]

a*x-b*cos(f*x+e)/f

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 17, normalized size = 1.06 \begin {gather*} a x - \frac {b \cos \left (f x + e\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*sin(f*x+e),x, algorithm="maxima")

[Out]

a*x - b*cos(f*x + e)/f

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 19, normalized size = 1.19 \begin {gather*} \frac {a f x - b \cos \left (f x + e\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*sin(f*x+e),x, algorithm="fricas")

[Out]

(a*f*x - b*cos(f*x + e))/f

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 19, normalized size = 1.19 \begin {gather*} a x + b \left (\begin {cases} - \frac {\cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \sin {\left (e \right )} & \text {otherwise} \end {cases}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*sin(f*x+e),x)

[Out]

a*x + b*Piecewise((-cos(e + f*x)/f, Ne(f, 0)), (x*sin(e), True))

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 17, normalized size = 1.06 \begin {gather*} a x - \frac {b \cos \left (f x + e\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*sin(f*x+e),x, algorithm="giac")

[Out]

a*x - b*cos(f*x + e)/f

________________________________________________________________________________________

Mupad [B]
time = 7.64, size = 25, normalized size = 1.56 \begin {gather*} a\,x-\frac {2\,b}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a + b*sin(e + f*x),x)

[Out]

a*x - (2*b)/(f*(tan(e/2 + (f*x)/2)^2 + 1))

________________________________________________________________________________________